state machine transition function. There are any references about state machine transition function in here. you can look below.